package com.itheima.myreflect01;

public class RefletDemo01 {
    public static void main(String[] args) throws ClassNotFoundException {
        //通过Class类中的静态方法forName();
            //参数:全类名 = 包名+类名
        Class student = Class.forName("com.itheima.myreflect01.Student");
        System.out.println(student);

        //通过Class属性来获取
            //形式: 类名.class;
        Class student01 = Student.class;
        System.out.println(student01);

        //通过对象的getClass();方法进行获取
        Student student1 = new Student();
        Class student02 = student1.getClass();
        System.out.println(student02);


        System.out.println(student==student01);
        System.out.println(student01==student02);
    }
}
